package com.boolib.commons;

public class Const {


    public interface   Dfs{
        final String DFS_CONF = "classpath:fastdfs-client.properties";
    }

    /**
     *
     * 全局 正常状态 0  错误状态 1
     *
     * 系统状态 10000 正常状态
     *
     *
     *
     */
    public interface  System{


        Integer GLOBAL_NORMAL = 0 ;
        Integer GLOBAL_ERROR = 1 ;

        enum  Status{
            NORMAL(10000,"状态正常"),
            UNAUTHENTICATION(10001,"未登录"),
            PERMISSIONDENIED(10002,"权限不足"),
            ARGUMENTERROR(10003,"错误：参数错误"),
            ARGUMENTNULL(10004,"参数：参数不能为空"),
            UNEXIST(10005,"不存在"),
            EXIST(10006,"存在");
            int code ;
            String message;

            public int getCode() {
                return code;
            }

            public void setCode(int code) {
                this.code = code;
            }

            public String getMessage() {
                return message;
            }

            public void setMessage(String message) {
                this.message = message;
            }

            Status(int i, String s) {
                this.code= i ;
                this.message = s;
            }

        }
    }





    /***
     * 品牌类 20001
     */
    public interface Brand{
        Integer NORMAL = 0 ;
         Integer EXIST = 0;
         Integer FORBID = 1;
         Integer UNEXIST = 2;


        enum Status{
            EXIST(20000,"品牌存在"),
            FORBID(20001,"品牌已禁用"),
            UNEXIST(20002,"品牌已删除");
            int code ;
            String message;

            Status(int i, String message) {
                this.code = i ;
                this.message = message;
            }

            public int getCode() {
                return code;
            }

            public void setCode(int code) {
                this.code = code;
            }

            public String getMessage() {
                return message;
            }

            public void setMessage(String message) {
                this.message = message;
            }
        }
    }


    /**
     *
     * 用户状态 30000
     */


    public interface  User{
        String SESSIONAUTH="current_user";
        Integer ISADMIN=1;
        Integer ISUSER=0;

        //用户正常情况
        Integer STATUSNORMAL =0;
        String ALTERPASSWORDURL ="/userAlterPassBeforeLogin" ;
        Integer NORMAL = 0;

        enum  Status{



            USEREXIST(30001,"用户已存在"),

            USERNOTEXIST(30002,"用户不存在"),

            REGISTERSUCCESS(30003,"用户注册成功"),

            REGISTERFAILD(30004,"用户注册失败"),

            //账号不存在
            LOGINFAILD (30005,"账号不存在"),


            PASSWORDFAILD(30006,"密码不正确"),

            EMAILEXIST(30007,"邮箱已存在"),

            PHONEEXIST(30008,"手机已注册"),

            UNBINDMAIL(30009,"邮箱尚未绑定，请联系管理员"),

            TOKENEXPIRE(30010,"Token已失效"),


            TOKENERROR(30011,"Token无效"),

            USERFORBID(30012,"用户已禁用"),
            USERDEL(30013,"用户已删除");
            Integer code ;

            String message;






            Status(int i, String message) {
                this.code = i ;
                this.message = message;
            }

            public Integer getCode() {
                return code;
            }

            public void setCode(Integer code) {
                this.code = code;
            }

            public String getMessage() {
                return message;
            }

            public void setMessage(String message) {
                this.message = message;
            }
        }



    }


    /***
     * 商品状态40000
     */
    public interface Product{

        Integer NORMAL = 0;

        enum Status{
            ON_SALE(40001,"上架"),

            OFF_SALE(40002,"已下架"),
            UNEXIST(40003,"不存在");
            Status(int code, String message) {
                this.code = code;
                this.message = message;
            }

            int code ;
            String message;

            public int getCode() {
                return code;
            }

            public void setCode(int code) {
                this.code = code;
            }

            public String getMessage() {
                return message;
            }

            public void setMessage(String message) {
                this.message = message;
            }
        }
    }



    public interface Cart {

        String REDIS_PERFIX="Cart_";


        boolean UNCHECK = false;
        boolean CHECK = true;

       enum CartStatusEnum{
           UNEXIST(-1,"购物车中不存在该商品");

           CartStatusEnum(int i, String txt) {
               this.code = code;
               this.message = message;
           }
           int code ;
           String message;

           public int getCode() {
               return code;
           }

           public void setCode(int code) {
               this.code = code;
           }

           public String getMessage() {
               return message;
           }

           public void setMessage(String message) {
               this.message = message;
           }

       }
    }




    public enum ProductStatusEnum {


    }

    public interface  Category{
        Integer NORMAL = 0;
        Integer FORBID = 1;

        enum ERRORSTATUS{
            CATEGORYEXIST(3001,"品牌已存在"),;

            int code ;
            String message;

            public int getCode() {
                return code;
            }

            public void setCode(int code) {
                this.code = code;
            }

            public String getMessage() {
                return message;
            }

            public void setMessage(String message) {
                this.message = message;
            }

            ERRORSTATUS(int i, String s) {
                this.code= i ;
                this.message = s;
            }
        }


    }

    public interface  SysUser {
        String SESSIONAUTH="current_sysuser";

        Integer ADMINISTRATOR  = 1;
    }







}
